class Person {
  String? name;
  int? age;

  Person({this.name, this.age});

  Map<String, dynamic> toJson() {
    return {'name': name, 'age': age};
  }

  Person.fromJson1(Map<String, dynamic> json) {
    name = json['name'];
    age = json['age'];
  }

  factory Person.fromJson(Map<String, dynamic> json) {
    return Person(name: json['name'], age: json['age']);
  }
}
